﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Runtime.CompilerServices;

namespace Hands.LoginControl
{
    internal class UriBranch : IForced
    {
        private Regex branchRegex = null;

        private StringBuilder branchDirectory = new StringBuilder();

        internal UriBranch(Regex branchRegex)
        {
            this.branchRegex = branchRegex;
        }

        #region IForced 成员

        [MethodImpl(MethodImplOptions.Synchronized)]
        public bool isNeedToLogin(string path)
        {
            return branchRegex.IsMatch(path);
        }

        #endregion
    }
}
